package Controller;

import junit.framework.TestCase;

import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

public class RegisterControllerTest extends TestCase{
	private RegisterController controller;
	
	@Before
	public void setUp() throws Exception {
		super.setUp();
		controller=new RegisterController();
	}

	@After
	public void tearDown() throws Exception {
		super.tearDown();
	}

	@Test
	public void testNameIsExist() {
		Assert.assertEquals(false, controller.nameIsExist("Ammy"));
	}

	@Test
	public void testSafetyLevel() {
		int i=controller.safetyLevel("111111");
		Assert.assertEquals(-1,i);
	}

	@Test
	public void testMailIsValid() {
		Assert.assertEquals(false, controller.mailIsValid("qqq.xxzz"));
	}

}
